from django.db import models
from django.contrib.auth.models import User


class Status(models.Model):
    name = models.CharField(max_length=200)
    description = models.CharField(max_length=500)


class Tags(models.Model):
    name = models.CharField(max_length=200)
    description = models.CharField(max_length=500)


class Article(models.Model):
    title = models.CharField(max_length=200)
    subtitle = models.CharField(max_length=500)
    body = models.TextField()
    status = models.ForeignKey(Status)
    public_user = models.ForeignKey(User, related_name='public_user')
    public_date = models.DateTimeField()
    last_modification_user = models.ForeignKey(User, related_name='last_modification_user')
    last_modification_date = models.DateTimeField()
    tags = models.ManyToManyField(Tags)

